package com.yun.cloud.service;

import com.yun.cloud.entity.Dept;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by lsy
 * on 2018/6/11 17:52.
 */
@FeignClient(value = "MICRO-SERVICE-CLOUD-DEPT", fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

    @RequestMapping(value = "/consumer/dept/add", method = RequestMethod.GET)
    boolean add(Dept dept);

    @RequestMapping(value = "/consumer/dept/get/{id}", method = RequestMethod.GET)
    Dept get(@PathVariable("id") Long id);

    @RequestMapping(value = "/consumer/dept/list", method = RequestMethod.GET)
    List<Dept> list();

    @RequestMapping(value = "/consumer/dept/discovery", method = RequestMethod.GET)
   Object discovery();
}
